#/usr/bin/env bash
cpu_number=$( cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l )
core_number_per_cpu=$( cat /proc/cpuinfo| grep "cpu cores"| uniq | awk -F: '{print $2}' |awk '{print $1}' )
logic_cpu_number=$( cat /proc/cpuinfo| grep "processor"| wc -l )

echo "物理CPU数目: ${cpu_number}"
echo "CPU的核心数目: ${core_number_per_cpu}"
echo "逻辑CPU数目: ${logic_cpu_number}"
